﻿<!--{inc(header.view.html)}-->

<div class="content" id="content">
	<div class="top-menu-box">
    	<div class="z">
            <span class="z-f"><a href="#">网站设置</a>&nbsp;&gt;</span>
            <span class="z-f"><a href="#">广告位列表</a></span>
            <div class="z-f-r"><span class="user-t"><a href="{$site_url}"  target="_blank">网站首页</a></span><span class="user-info"></span><a href="index.php?app=default&act=quit" onClick="return confirm('确认退出管理系统吗？');"   >退出管理</a></div>
        </div>
        <div class="top-menu">
        	<ul>
            	<li class="current"><a href="#">广告位列表</a></li>

                                                 <li><a href="index.php?app=adplace&act=add"  target="mainframe">添加广告位</a></li>
												 
            </ul>
            <div class="clear"></div>
        </div>
    </div>
    
    <div class="main">

    <table  class="data" >
        <thead>
	
    <th>广告位名称</th>
    <th>广告类型</th>
    <th>申请购买</th>
    <th>点击</th>
    <th>调用代码</th>	

	<th>操作</th>	
		
        </thead>
	    <tbody>
		
<?php foreach((array)$data as $_key => $_value ) { ?>

<tr  >
	<td  align="center">{$_value.name}</td>
	<td>{$datype[$_value.type]}</a></td>
	<?php
		if( $_value[ifsale] ){
			$_value[ifsale] ='<font color="red">允许购买</font>';
		}else{
			$_value[ifsale] ='禁止购买';
		}
		?>
	<td>{$_value.ifsale}</td>        
	<td>{$_value.hits}</td>  

	<td>
      <input type="hidden" name="hiddenField" value="<SCRIPT LANGUAGE='JavaScript' src='{SITE_URL}/?app=ad&act=js&adid={$_value[keywords]}'></SCRIPT>" id="ja_{$_value[id]}">
      <a href="#" onClick="JM_cc('ja_{$_value[id]}');alert('代码复制成功，你可以粘贴在网页里需要显示的地方,即可显示广告！')"> 
      点击复制代码</a>	
	</td>
	<td>
 	<a href="{$_value[demourl]}" target="_blank" onclick="if('{$_value[demourl]}'=='')alert('本广告位没有设置预览网址');return false;" alt='点击预览'>预览</a>&nbsp; 
      <a href="?app=adplace&act=edit&id={$_value[id]}">修改</a> 
      &nbsp; <a href="?app=adplace&act=del&id={$_value[id]}" onclick="return confirm('你确认要删除这个广告吗?')">删除</a></td>
    
                                               
	                                       
	</td>
</tr>

<?php } ?>


	    </tbody>
    </table>
	
    
<SCRIPT LANGUAGE="JavaScript">
<!--
function JM_cc(ob){
var obj=document.getElementById(ob); if (obj) { 
obj.select();js=obj.createTextRange();js.execCommand("Copy");}
}
//-->
</SCRIPT>
	
        
        <div class="notic"><img  src="{$web_view_dir}style/images/light.gif" align="absmiddle" /> <b>提示: </b> <span ></span> </div>
    </div>
</div>
<!--{inc(footer.view.html)}-->